/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2024-06-23
 * Time: 16:25
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.create();
        System.out.println("===前序遍历===");
        binaryTree.preOrder(root);
        System.out.println();
        System.out.println("===中序遍历===");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.println("===后序遍历===");
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("=======树中节点的个数: ======");
        System.out.println(binaryTree.size1(root));
        System.out.println(BinaryTree.usedSize);
        System.out.println("叶子节点的个数:");
        System.out.println(binaryTree.getLeafNodeCount1(root));

        System.out.println("第k层节点的个数: ");
        System.out.println(binaryTree.getKLevelNodeCount(root, 3));


    }
}
